#include "widget.h"
#include "ui_widget.h"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(this,&Widget::MySignal,this,&Widget::handleMysignal);

}

void Widget::handleMysignal()
{
    this->setWindowTitle("处理自定义信号");
}



Widget::~Widget()
{
    delete ui;
}



void Widget::on_pushButton_clicked()
{
    emit MySignal();
}

